package com.ihr360.payroll.model.dto.attendance.rule.workhour.superclass;

import com.ihr360.commons.model.entity.NumberIdWithTime;
import com.ihr360.payroll.model.dto.attendance.type.WorkHourUnit;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.MappedSuperclass;
import java.sql.Date;

@MappedSuperclass
public class AbstractWorkHour extends NumberIdWithTime<Long>{

    /** 工时数 （实际存储做了*100操作）*/
    private Integer workCount;

    /** 工时单位 */
    @Column(nullable = false, length = 20)
    @Enumerated(EnumType.STRING)
    private WorkHourUnit unit = WorkHourUnit.MONTH;

    /** 生效日期 */
    @Column(nullable = false)
    private Date effectiveAt;

    /** 失效日期 */
    private Date invalidAt;

}